package com.muyan;

import com.muyan.ext.proxy.JavaClassLoader;
import com.muyan.ext.proxy.impl.MyJdkInvocationHandler;
import com.muyan.service.OrderService;
import com.muyan.service.impl.OrderServiceImpl;

/**
 * @Author: YLTDMenglc
 * @Date: 2019/6/10
 * @Time: 18:28
 * @Description:
 */
public class Test001 {

    public static void main(String[] args) throws Throwable {
//        OrderService  orderService = new $Proxy0(new MyJdkInvocationHandler(new OrderServiceImpl()));
//        orderService.order();
        OrderService orderService = (OrderService) MyProxy.newProxyInstance(new JavaClassLoader(), OrderService.class, new MyJdkInvocationHandler(new OrderServiceImpl()));
        orderService.order();
    }
}
